package com.wjh.controler;

import com.wjh.bean.User;
import org.springframework.web.HttpRequestHandler;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class UserControl2 implements HttpRequestHandler {
    @Override
    public void handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        User user=new User();
        user.setMobile("123654");
        user.setUsername("lilili");
        request.setAttribute("user",user);
        request.getRequestDispatcher("index.jsp").forward(request,response);
    }
}
